from django.db import models

from apps.common.model import BaseModel


class Subscription(BaseModel):
    company_name = models.CharField(max_length=255)
    first_name = models.CharField(max_length=100)
    last_name = models.CharField(max_length=100)
    phone_number = models.CharField(max_length=15)
    email = models.EmailField()
    message = models.TextField()

    class Meta:
        ordering = ['-created_at']
        verbose_name = '订阅'
        verbose_name_plural = "订阅"

    def __str__(self):
        return f"{self.company_name} - {self.first_name} {self.last_name}"
